{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The autoreload extension is already loaded. To reload it, use:\n",
      "  %reload_ext autoreload\n"
     ]
    }
   ],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "%matplotlib inline\n",
    "from CartPoleESParallel import CartPoleES\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Using 1 processes.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/shawn/.virtualenvs/756/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
      "  from ._conv import register_converters as _register_converters\n",
      "Using TensorFlow backend.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Spawning subprocess for sub_population:  0 200\n",
      "hello\n",
      "here test brain\n",
      "here test brain2\n",
      "here in unflatten\n",
      "here in unflatten loop\n",
      "here in unflatten loop2\n",
      "[<Process(Process-1, started)>]\n"
     ]
    }
   ],
   "source": [
    "experiment = CartPoleES(max_generations=60, convergence_reward=50)\n",
    "history = experiment.train(num_tests=2, num_processes=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "history[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.plot(history[0]['fitness_history'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f2c1fd69ba8>]"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xt8lGeZ+P/PPZmczyeSkBBIIBQIFAgRaGlpFVpae27Vdddd6+rXqruuurrraX/r6af+rK66ul917dp1u7pqa4WCdVt6sAWEAgVCSsIhByCHCTnN5DzkMDP374+ZoWnIYZI8z5y43q8XryQzz+S5OqRXHq7nuq9baa0RQggR+SyhDkAIIYQxJKELIUSUkIQuhBBRQhK6EEJECUnoQggRJSShCyFElJCELoQQUUISuhBCRAlJ6EIIESWswTxZTk6OXrJkSTBPKYQQEe/48ePdWuvcmY4LakJfsmQJx44dC+YphRAi4imlmgI5TkouQggRJSShCyFElJCELoQQUUISuhBCRAlJ6EIIESUkoQshRJSQhC6EEFFCEroQQpiovmOA771YR+fAsOnnkoQuhBAmOtHcww9frmdkzGP6uSShCyGEiZrsTqwWRUF6gunnkoQuhBAmanY4KcpMxBpjfrqVhC6EECZqdjhZlJUUlHNJQhdCCBM12Z0szpaELoQQEa3POUbf5TEWZyUH5XyS0IUQwiTNDieAlFyEECLSNTmGAKTkIoQQka7J7r1CL5YrdCGEiGwtDic5KXEkxwdnczhJ6EIIYZImuzNoV+cgCV0IIUzT7HCyODs4HS4gCV0IIUwx6vLQ1nc5aB0uIAldCCFM0drjRGtYLAldCCEiW5OvBz1YLYsgCV0IIUzR4kvoxeGW0JVSf6+UqlVK1Silfq2USlBKlSiljiilGpRSTyql4swOVgghIkWT3UlibAy5KfFBO+eMCV0pVQh8AqjUWq8GYoD3Ao8C39daLwN6gA+ZGagQQkQSf8uiUipo5wy05GIFEpVSViAJuAS8A3ja9/wTwP3GhyeEEJGpxeEMark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/D3F+wvmEjCGt2b7Ibz3bV4G6oGXgCzfsZXAz8a99oO+n9UG4K9DEGcD3pqz/+fU3yG2EPjf6X5OQhDrL3w/g2/gTdIFE2P1fX1VjghmnL7H/8v/cznu2JC+p1prWSkqhBDRItxKLkIIIeZIEroQQkQJSehCCBElJKELIUSUkIQuhBBRQhK6EEJECUnoQggRJSShCyFElPj/AZGJLclCNF7jAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(history[1]['fitness_history'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
